package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class BrowseEndpoint implements Sequenceable, Serializable {
    @SerializedName("browseId")
    private String browseId;

    @SerializedName("params")
    private String params;

    public static final Sequenceable.Producer<BrowseEndpoint> CREATOR = new Producer<BrowseEndpoint>() {
        @Override
        public BrowseEndpoint createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            BrowseEndpoint browseEndpoint = new BrowseEndpoint();
            browseEndpoint.unmarshalling(parcel);
            return browseEndpoint;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.browseId);
        parcel.writeString(this.params);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.browseId=parcel.readString();
        this.params=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "BrowseEndpoint{" +
                "browseId = '" + browseId + '\'' +
                ",params = '" + params + '\'' +
                "}";
    }

    public String getBrowseId() {
        return browseId;
    }

    public void setBrowseId(String browseId) {
        this.browseId = browseId;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }
}
